package com.brid.aop.controller;


import com.brid.aop.anno.Logger;
import lombok.extern.java.Log;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: sijunqiang
 * @Date: 2020/4/20 19:37
 * @Description:
 */
@RestController
@RequestMapping(value = "/aspect", produces = MediaType.APPLICATION_JSON_VALUE)
public class AspectController {


    @GetMapping(value = "/test")
    @Logger(value = "日志的打印")
    public String testAspect() {
        System.out.println("aop实验成功");
        return "success";
    }

    @Logger(value = "日志的打印")
    public void testAspectLog() {
        System.out.println("第二次日志的打印 ");
    }


}
